package com.xioaye.supermarket.mapper;

import com.xioaye.supermarket.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Select("select * from tb_user where username=#{username} and password=#{password}")
    User queryUser(String username, String password);

    @Insert("insert into tb_user(username, password) values(#{username}, #{password})")
    int addUser(String username, String password);
}
